﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class frog : MonoBehaviour
{
    Animator anim ;
    GameObject player;
    Vector3 movement;
    void Start()
    {
        anim=GetComponent<Animator>();
        player=GameObject.Find("player");
        movement.x=200;
    }

    void Update()
    {
        float d=transform.position.x-player.transform.position.x;
        anim.SetFloat("distance",d);
    }
    void jump(){
        transform.position-=movement*Time.deltaTime;
    }
}
